Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

validate and remove conflict data when copy event to new draft #375

Merged
merged 2 commits into from
Dec 5, 2018

Conversation

dotanthanh
Copy link
Contributor

@dotanthanh dotanthanh commented Dec 5, 2018

Fix for issue #311 and #279. Notices:

  • Now before copy from an existing event to a new draft, the existing event data will be validated.
  • After validating, all invalid fields will be emptied based on their types: array -> [], object -> {}, string -> '' ...etc
  • Fields with tricky types (if there is any) like null, undefined, boolean... should be left unchanged.

There is no validation for location and keywords in UI. Maybe these should to a later separate issue.

Signed-off-by: Thanh Do [email protected]

@ghost ghost assigned dotanthanh Dec 5, 2018
@ghost ghost added the in progress label Dec 5, 2018
@dotanthanh dotanthanh force-pushed the fix/311-validation-when-copy-event branch from f20b95c to a459d02 Compare December 5, 2018 13:41
Copy link
Contributor

@Rikuoja Rikuoja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good fix, just check the comments below :)

src/views/Event/index.js Outdated Show resolved Hide resolved
src/actions/editor.js Outdated Show resolved Hide resolved
@dotanthanh dotanthanh force-pushed the fix/311-validation-when-copy-event branch from a459d02 to 926af37 Compare December 5, 2018 15:18
@dotanthanh dotanthanh force-pushed the fix/311-validation-when-copy-event branch from 8fa2e53 to 0fdd7bd Compare December 5, 2018 16:09
@dotanthanh dotanthanh force-pushed the fix/311-validation-when-copy-event branch from 0fdd7bd to da3544b Compare December 5, 2018 16:32
@Rikuoja Rikuoja merged commit 0ddfa4f into master Dec 5, 2018
@ghost ghost removed the in progress label Dec 5, 2018
@Rikuoja Rikuoja deleted the fix/311-validation-when-copy-event branch October 15, 2019 10:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants